import React from "react"
import { Divider } from 'antd';
import qrcode from 'images/qrcode.png'
import "./index.less"

class FooterEn extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      path_eng: '/#/introduce/long_english',
      path_prog: '/#/introduce/long_program',
      about_us: '/#/introduce/about_us',
      footerList: [
        { href: "about_us", name: "About us" },
        { href: "path_eng", name: "Dragon english" },
        { href: "path_prog", name: "Dragon programming" },
        // { href: '', name: "baiqueshici" },
        // { href: '/#/courPm', name: 'Dragon programming' },
        // { href: '/#/courMa', name: 'Dragon mathematics' },
        // { name: "Dragon mathematics" }
      ]
    }
  }

  componentDidMount() {
    const userAgent = navigator.userAgent
    const isPad = /pad/i.test(userAgent)
    isPad && this.setState({
      path_eng: '/#/introduce/long_english_pad',
      path_prog: '/#/introduce/long_program_pad'
    })
  }

  render() {
    const { footerList } = this.state
    return (
      <div className='footer-en'>
        <div className="footer-container">
          <div className="footer-left">
            <ul className="footer-list">
              {footerList.map((item, i) => {
                return (
                  <li key={i}>
                    <a href={this.state[item.href]}>{item.name}</a>
                    {i < footerList.length - 1 && <Divider type="vertical" />}
                  </li>
                )
              })}
            </ul>
            <div>
              {/* <p>粤网文[2017]6138-1456号 新出网证（粤）字010号 网络视听许可证1904073号 增值电信业务经营许可证：粤B2-20090059 B2-20090028</p>
            <p>Copyright 1998 - 2018 Tencent. All Rights Reserved</p> */}
              <p>
                Copyright © 2018 Zilongshu.com All Rights Reserved　版权所有·子塾
                京ICP备18024169号
              </p>
              <p>Contact information：contact@zilongshu.com 4000192516</p>
            </div>
          </div>
          <div className="qrcode">
            <img src={qrcode} alt="Sweep yards attention" />
            <p>Sweep yards attention</p>
          </div>
        </div>
      </div>
    )
  }
}

export default FooterEn
